fix(logs): surface handled errors as info in logs#3190
Merged
waleedlatif1 merged 2 commits intostagingfrom Feb 11, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
67c2efd to
4a17367
Compare
Contributor
Greptile OverviewGreptile SummaryThis PR implements a system to distinguish between handled and unhandled errors in workflow executions, ensuring that errors caught by error handler paths (error ports) are logged as info-level rather than error-level. Key changes:
The implementation correctly propagates the Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor as Block Executor
participant Log as Block Log
participant TraceBuilder as Trace Spans Builder
participant Logger as Execution Logger
participant UI as Trace Spans UI
Executor->>Executor: Check hasErrorPort()
alt Has Error Port
Executor->>Log: Set errorHandled = true
Executor->>Executor: Return error output (don't throw)
else No Error Port
Executor->>Executor: Throw error
end
Log->>TraceBuilder: Build trace spans from logs
TraceBuilder->>TraceBuilder: Copy errorHandled to spans
TraceBuilder->>TraceBuilder: Propagate to iterations/containers
TraceBuilder->>TraceBuilder: Check for unhandled errors
alt Has Unhandled Errors
TraceBuilder->>TraceBuilder: Set workflow status = 'error'
else All Errors Handled
TraceBuilder->>TraceBuilder: Set workflow status = 'success'
end
TraceBuilder->>Logger: Pass trace spans
Logger->>Logger: checkSpanForErrors(errorHandled check)
alt Has Unhandled Errors
Logger->>Logger: Set level = 'error', status = 'failed'
else No Unhandled Errors
Logger->>Logger: Set level = 'info', status = 'completed'
end
TraceBuilder->>UI: Display spans
UI->>UI: hasUnhandledErrorInTree(span)
alt Root Workflow Span
UI->>UI: Use hasUnhandledErrorInTree()
else Other Spans
UI->>UI: Use hasErrorInTree()
end
UI->>UI: Apply error styling based on result
|
...p/workspace/[workspaceId]/logs/components/log-details/components/trace-spans/trace-spans.tsx
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
@cursor review |
Collaborator
Author
|
@greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist